package com.platform.destiny.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@Data
@TableName(value = "tb_user")
public class User implements Serializable {

    private static final long serialVersionUID = 7669385498192394992L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    // 用户名
    private String username;
    // 密码
    private String password;
    // 盐值
    private String salt;
    // 昵称
    private String nickname;
    //
    private String cellphone;
    //
    private String openId;

    private String company;

    private String email;

    private String idCard;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date birthday;

    private Integer age;

    private Integer sex;

    private BigDecimal weight;


    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date updateTime;

    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }

}
